//
//  SLLockModel.h
//  SlockApp
//
//  Created by 凯朱 on 2024/7/19.
//

#import <Foundation/Foundation.h>
#import "SLLockKeyModel.h"
#import <CoreBluetooth/CBPeripheral.h>
#import "SLLockLogCell.h"
@interface SLLockModel : NSObject
//锁类型 1-蓝牙 2-wifi锁
@property(nonatomic, strong)NSString *deviceCategory;//1，蓝牙锁,；2，网关锁
@property(nonatomic, strong)NSString *deviceName;//设备名称
@property(nonatomic, strong)NSString *desc;
@property(nonatomic, strong)NSString *uuid;//设备Uuid
@property(nonatomic, assign)BOOL isGuest;//是否是访客
@property(nonatomic, assign)BOOL isUpdating;//正在同步中
@property (nonatomic, strong)NSString *syncTime;/*同步时间戳*/
@property (nonatomic, strong)NSArray <SLLockKeyModel *> *keys;

@property(nonatomic, strong)NSString *deviceId;
@property(nonatomic, strong)NSString *productId;
@property(nonatomic, strong)NSString *productName;
@property(nonatomic, strong)NSString *deviceNo;//设备编码
@property(nonatomic, assign)BOOL isBind;//已经被绑定了

@property(nonatomic, strong)NSString *status;
@property(nonatomic, strong)NSString *bluetoothAddress;
@property (nonatomic, strong)NSArray <SLLockLogModel *> *mslUnlockLogList;
@property (nonatomic, strong)NSArray *mslLockKeyList;
@property (nonatomic, strong)NSString *deviceElectricQty;//电量
@property(nonatomic, strong)NSString *createBy;//创建者
@property(nonatomic, strong)NSString *createTime;//创建时间
@property(nonatomic, strong)NSString *deviceTypeId;
@property(nonatomic, strong)NSString *deviceType;
@property (nonatomic, strong)NSString *warnNum;/*告警数量*/
@property (nonatomic, strong)NSString *isHaveNewWarn;/*是否有新的告警信息*/
@property (nonatomic, strong)NSString *lastWarnType;/*最新的告警类型*/
@property (nonatomic, strong)NSString *membersNum;/*成员数量*/
@property(nonatomic, assign)BOOL isConnected;//当前是连接的状态
@property (nonatomic, strong)CBPeripheral *peripheral;//设备的蓝牙实例
@property(nonatomic, assign)BOOL isOpenPush;//是否开启了推送
@property(nonatomic, strong)NSString *pushEmail;//推送邮箱
@property(nonatomic, strong)NSIndexPath *indexPath;//推送邮箱

@property(nonatomic, assign)BOOL isOpenBurningAlarm;//是否开启高温报警
@property(nonatomic, assign)BOOL isOpenStrikingAlarm;//是否开启震动报警
@property(nonatomic, assign)BOOL isOpenEnergyModel;//是否开启了节能模式
@property(nonatomic, assign)BOOL isOpenDbModel;//是否开启了双模开锁
@property(nonatomic, assign)BOOL isOpenBlueToothModel;//是否开启了蓝牙开锁
@property(nonatomic, assign)BOOL isOpenWifiModel;//是否开启了wifi开锁
@property(nonatomic, assign)NSInteger regionDistance;//双模开锁监听范围
@property(nonatomic, strong)NSString *regionAddress;//双模开锁监听地址
@property(nonatomic, strong)NSString *dbLongitude;//双模开锁的经度
@property(nonatomic, strong)NSString *dbLatitude;//双模开锁的纬度
@property(nonatomic, strong)NSString *firmware;//固件版本号
@property(nonatomic, strong)NSString *mac;//mac地址
@property(nonatomic, strong)NSString *voice;//声音大小
@property(nonatomic, strong)NSString *serialNumber;//序列号
@property(nonatomic, strong)NSString *major;//ibeacon major
@property(nonatomic, strong)NSString *minor;//ibeacon minor
@property(nonatomic, strong)NSString *macAddress;


//分享的钥匙数据 - 仅作为分享钥匙时展示
@property (nonatomic, strong)NSString *keyName;//钥匙名称
@property (nonatomic, assign)NSInteger keyType;//1-永久钥匙 2-时间段钥匙  3-一次性钥匙
@property (nonatomic, assign)NSInteger lockType;//1-指纹锁 2-蓝牙锁
@property (nonatomic, strong)NSString *lockName;//锁名称
@property (nonatomic, strong)NSString *startTime;//开始时间 时间段和一次性钥匙有值 2018-01-26 08:00:00
@property (nonatomic, strong)NSString *endTime;//开始时间 时间段和一次性钥匙有值 2018-01-26 08:00:00
@property (nonatomic, strong)NSString *weekDays;/*一周重复时间 例如@[@"1",@"2",@"3"]//分别代表周日-周六 时间段钥匙有值*/
@property (nonatomic, strong)NSString *dayStart;//循环钥匙 - 每天开始时间 时间段钥匙有值 08:00
@property (nonatomic, strong)NSString *dayEnd;//循环钥匙 - 每天结束时间 时间段钥匙有值 08:30
@property (nonatomic, strong)NSString *uid;/*钥匙所属的成员id*/
@property (nonatomic, strong)NSString *uame;/*钥匙所属的成员名称*/
@property (nonatomic, strong)NSArray <SLLockFingerModel *>*fingers;//钥匙的指纹数据
@property (nonatomic, strong)NSString *keyId;/*钥匙id 服务端生成*/
@property (nonatomic, strong)NSString *ownerId;/*钥匙拥有者id*/
@property (nonatomic, strong)NSString *ownerName;/*钥匙拥有者名字*/
@property (nonatomic, strong)NSString *isUse;/*一次性钥匙是否已经使用过*/

//网关数据
@property(nonatomic, strong)NSString *wifiName;
@property(nonatomic, strong)NSString *model;//产品型号
@property(nonatomic, strong)NSString *rssi;
@property(nonatomic, strong)NSString *onlineStatus;
@property(nonatomic, assign)BOOL isConnectBridge;
@property(nonatomic, strong)NSString *conId;
@property(nonatomic, strong)NSString *networkMode;
@property(nonatomic, strong)NSDictionary *bridgeScanInfo;
@property (nonatomic, strong)NSString *memberId;
@property (nonatomic, strong)NSString *bridgeDeviceNo;

@end

